package com.toidep.entities;

import org.json.JSONObject;

import com.toidep.api.ParseJSON;
import com.toidep.config.Constants;
import com.toidep.utilities.DatetimeUtil;

public class DetailEmailEntity {

	private String id;
	private String code_name;
	private String to_email;
	private String subject;
	private String body;
	private String created;

	public void setInfo(JSONObject jsonObject) {
		this.id = ParseJSON.getStringValue(jsonObject, Constants.PARAM_RESPONSE_ID);
		this.code_name = ParseJSON.getStringValue(jsonObject, Constants.PARAM_RESPONSE_CODE_NAME);
		this.to_email = ParseJSON.getStringValue(jsonObject, Constants.PARAM_RESPONSE_TO_EMAIL);
		this.subject = ParseJSON.getStringValue(jsonObject, Constants.PARAM_RESPONSE_SUBJECT);
		this.body = ParseJSON.getStringValue(jsonObject, Constants.PARAM_RESPONSE_EMAIL_BODY);
		this.created = DatetimeUtil.convertTimestampToString(ParseJSON
				.getStringValue(jsonObject, Constants.PARAM_RESPONSE_CREATED));
	}

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getCode_name() {
		return code_name;
	}

	public void setCode_name(String code_name) {
		this.code_name = code_name;
	}

	public String getTo_email() {
		return to_email;
	}

	public void setTo_email(String to_email) {
		this.to_email = to_email;
	}

	public String getSubject() {
		return subject;
	}

	public void setSubject(String subject) {
		this.subject = subject;
	}

	public String getBody() {
		return body;
	}

	public void setBody(String body) {
		this.body = body;
	}

	public String getCreated() {
		return created;
	}

	public void setCreated(String created) {
		this.created = created;
	}
	
	
}
